<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <body>

        This text above will not be displayed.

        <ui:composition template="/templateLogado.xhtml">

            This text will not be displayed.

            <ui:define name="title">
                index
            </ui:define>

            <ui:define name="content">

                <h2><h:outputText value="Alteração dos dados da Turma"/></h2>

                <h3>
                    <h:form>
                        <h:panelGrid columns="3">
                            <h:outputText value="Id: "/>
                            <h:outputText id="id" value="#{turmaMB.turmaCorrente.id}" />
                            <h:message for="id" />

                            <h:outputText value="Semestre: "/>
                            <h:inputText id="semestre" value="#{turmaMB.turmaCorrente.semestre}" 
                                         requiredMessage="É necessário informar o semestre"
                                         required="true"/>
                            <h:message for="semestre" />

                            <h:outputText value="Ano: "/>
                            <h:inputText id="ano" value="#{turmaMB.turmaCorrente.ano}" 
                                         requiredMessage="É necessário informar o ano"
                                         required="true" maxlength="11"/>
                            <h:message for="ano" />

                            <h:outputText value="Nome do Professor: "/>
                            <h:inputText id="nomeProfessor" value="#{turmaMB.turmaCorrente.nomeProfessor}" 
                                         requiredMessage="É necessário informar o nome do Professor"
                                         required="true" />
                            <h:message for="nomeProfessor" />

                            <h:outputText value="Disciplina: "/>
                            <h:selectOneMenu id="comboBoxDisciplina" required="true"
                                             requiredMessage="É necessário escolher uma disciplina"
                                             value="#{turmaMB.comboDisciplina.selecao}" >
                                <f:selectItems value="#{turmaMB.comboDisciplina.listaSelecao}" />
                            </h:selectOneMenu>
                            <h:message for="comboBoxDisciplina" />

                            <h:commandButton value="Voltar" action="#{turmaMB.voltarExibirTodos}" immediate="true" />

                            <h:commandButton value="Salvar Alteração" action="#{turmaMB.salvarEdicao}"/>
                        </h:panelGrid>
                    </h:form>
                </h3>

            </ui:define>

            This text will not be displayed.

        </ui:composition>

        This text below will also not be displayed.

    </body>
</html>

